﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using Sharp.Domain.Model;
using Sharp.Infrastructure;
using System.ComponentModel.DataAnnotations;

namespace Sharp.Domain.CMSBoundedContext.VIUModule.Aggregates
{
    /// <summary>
    /// VIU分类
    /// </summary>
    public partial class VIUCategory : AggregateRoot, IStandardEntity, IStandardState
    {
        public VIUCategory()
        {
            Children = new List<VIUCategory>();
            Tags = new List<Tag>();
        }

        public string Name { get; set; }
        public Guid? ParentId { get; set; }
        public int OrderId { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [StringLength(255)]
        public string Remark { get; set; }

        /// <summary>
        /// 排序移动动作
        /// </summary>
        [NotMapped]
        public string OrderType { get; set; }

        public DateTime? CheckInTime { get; set; }
        public Guid? CheckInUserId { get; set; }
        public DateTime? ModifiTime { get; set; }
        public Guid? ModifiedUserId { get; set; }
        public EntityStateOperate EntityState { get; set; }

        public VIUCategory Parent { get; set; }
        public ICollection<VIUCategory> Children { get; set; }

        public virtual ICollection<Tag> Tags { get; set; }
    }
}